/**
 * 
 */
var app = angular.module("indexApp",[]);
app.controller("indexController",function($scope,$http,$timeout){
//	$timeout(init, 0);
	

//	$scope.data = [{PROJECT:"",YEAR:"",OFFICE:"",COST_CTR:"",ENTITY:"",Salary_Grade:""}];
	
//	$scope.PROJECT_LIST = ["Actual","Final-Budget"];
//	
//	$scope.YEAR_LIST = ["FY15","FY16","FY17","FY18"];
//	
//	$scope.Salary_Grade_LIST = ["All Grade"];
//	
//	$scope.ENTITY_LIST = ["Consulting","Local IAS","Local_Territory_Entity","Main Practice","Regional IAS","WMS"];
	
	$scope.param = {};
	
	$scope.reportSender = function(){
		console.log($scope.param)
		var tishi = layer.load(1);
		$http({
			url:context+"/report/run",
			method:"POST",
			data:$scope.param
		}).success(function(data){
			layer.close(tishi);
			layer.alert("报表已生成");
			console.log("==success==",data);
		}).error(function(data){
			layer.close(tishi);
			console.log("==处理异常==")
		});
	}
	
	
});